﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <ResourceDictionary.MergedDictionaries>
        <ResourceDictionary Source="TextBlockStyles.xaml"/>
    </ResourceDictionary.MergedDictionaries>
    <Style x:Key="Expander" TargetType="{x:Type Expander}">
        <Setter Property="HeaderTemplate">
            <Setter.Value>
                <DataTemplate>
                    <TextBlock Text="{Binding}"
                            VerticalAlignment="Center"
                            HorizontalAlignment="Center" RenderTransformOrigin="0.5,0.5">
                    	<TextBlock.LayoutTransform>
                    		<TransformGroup>
                    			<ScaleTransform/>
                    			<SkewTransform/>
                    			<RotateTransform Angle="-90"/>
                    			<TranslateTransform/>
                    		</TransformGroup>
                    	</TextBlock.LayoutTransform>
                    </TextBlock>
                </DataTemplate>
            </Setter.Value>
        </Setter>
        <Style.Triggers>
            <Trigger Property="IsExpanded" Value="True">
                <Setter Property="HeaderTemplate">
                    <Setter.Value>
                        <DataTemplate />
                    </Setter.Value>
                </Setter>
            </Trigger>
        </Style.Triggers>
    </Style>
</ResourceDictionary>